﻿using RndMaterialDisposalService.Attrbutes;
using RndMaterialDisposalService.Models;
using RndMaterialDisposalService.Models.RequestModel;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc;
using RndMaterialDisposalService.Models.Entitys;

namespace RndMaterialDisposalService.Services.Interface
{
    /// <summary>
    /// 
    /// </summary>
    public interface IDataDictionaryService
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="viewView"></param>
        /// <returns></returns>
        Task<List<ConfigDictionaryModel>> GetDirectory(string viewView);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="parentId"></param>
        /// <param name="name"></param>
        /// <param name="code"></param>
        /// <param name="remark"></param>
        /// <param name="Id"></param>
        /// <param name="viewType"></param>
        /// <returns></returns>
        Task<ConfigDictionaryModel> AddDirectory(Guid parentId, string name, string code, string remark, Guid? Id,int? funTag, string? viewType);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="parentId"></param>
        /// <returns></returns>
        Task<List<ConfigDictionaryModel>> GetDictItems(Guid parentId);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="parentCode"></param>
        /// <returns></returns>
        Task<List<ConfigDictionaryModel>> GetDictItems(string parentCode);

        /// <summary>
        /// 数据字典查询-标准
        /// </summary>
        /// <param name="parentCode"></param>
        /// <returns></returns>
        Task<List<StandardDictionaryConfigurationModel>> GetTemporaryDictItems(string parentCode);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ConfigDictionaryModel> AddDictItem(ConfigDictionaryModel model);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="parentId"></param>
        /// <param name="dictCode"></param>
        /// <returns>
        /// true  dictCode已存在
        /// false dictCode不存在
        /// </returns>
        Task<bool> VerifyDictCode(Guid? parentId,string dictCode);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ConfigDictionaryModel> UpdateDictItem(ConfigDictionaryModel model);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        Task<int> DeleteDictItem(Guid key);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="EditionType"></param>
        /// <returns></returns>
        Task<List<StandardDictionaryConfigurationModel>> GainDictCatalogueItemList(string EditionType);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="stand"></param>
        /// <returns></returns>
        Task<int> EditStandardDictionaryConfiguration(StandardDictionaryConfigurationModel stand);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="stand"></param>
        /// <returns></returns>
        Task<int> AddStandardDictionaryConfiguration(StandardDictionaryConfigurationModel stand);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="stand"></param>
        /// <returns></returns>
        Task<int> DeleteStandardDictionaryConfiguration(StandardDictionaryConfigurationModel stand);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="Code"></param>
        /// <returns></returns>
        Task<StandardDictionaryConfigurationModel> GetStandardDictionaryConfigurationItem(string Code);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="ParentId"></param>
        /// <returns></returns>
        Task<List<StandardDictionaryConfigurationModel>> GetSeekStandardDictionaryConfigurationList(Guid ParentId);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<StandardDictionaryConfigurationModel> GetSeekStandardDictionaryConfigurationItem(Guid Id);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="parentId"></param>
        /// <param name="appType"></param>
        /// <param name="pageNum"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(List<GeneralConfigurationDto> data, int count)> GetGeneralConfigList(Guid parentId, string appType, int pageNum = 1, int pageSize = 10);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="parentCode"></param>
        /// <returns></returns>
        Task<List<GeneralConfigurationDto>> GetGeneralConfigListByCode(string parentCode);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<GeneralConfigurationDto> AddGeneralConfigItem(GeneralConfigurationDto model);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        Task<int> DelGeneralConfigItem(Guid key);


    }
}
